package calendar;

import java.util.Calendar;

public class CalendarDemo1 {
	public static void main(String[] args) {
		Calendar calendar = Calendar.getInstance();
		System.out.println(calendar.get(Calendar.DAY_OF_YEAR));
		System.out.println(calendar.get(Calendar.YEAR));
		System.out.println(calendar.get(Calendar.MONTH) + 1);
		System.out.println(calendar.get(Calendar.DAY_OF_MONTH));

		System.out.println("今天是" + calendar.get(Calendar.YEAR) + "年" + calendar.get(Calendar.MONTH) + 1 + "月"
				+ calendar.get(Calendar.DAY_OF_MONTH) + "日");
		System.out.println("今天是星期" + (calendar.get(Calendar.DAY_OF_WEEK) - 1));
	}

}
